<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let str = "11:20,23:21,13:40";

      // const res = str.matchAll(/(\d{2}):(\d{2})/g);zzzz
      // console.log([...res]);

      const res = str.match(/(?<h>\d{2}):(?<m>\d{2})/);
      console.log(res);
      // console.log(res[1]);
      // console.log(res[2]);
      console.log(res.groups.h);
      console.log(res.groups.m);
    </script>
  </body>
</html>
